package low;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 70. 爬楼梯
 */
public class ClimbStairs {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while ((line = in.readLine()) != null) {
            int n = Integer.parseInt(line);

            int ret = new Solution().climbStairs(n);

            String out = String.valueOf(ret);

            System.out.print(out);
        }
    }

    static class Solution {
        public int climbStairs(int n) {
            int q=0,p=0,r=1;
            for (int i=1;i<=n;i++){
                q = p;
                p = r;
                r = q+p;
            }
            return r;
        }
    }
}
